#include<iostream>
using namespace std;
int n;
int main()
{
	int ans = 0;
	while (cin >> n) {
		ans++;
		int cnt = 0;
		while (n) {
			int k = n % 10;
			if (k % 2 == 0)cnt += k;
			n /= 10;
		}
		if (ans == 1) {
			cout << cnt << endl;
		}
		else {
			cout << endl;
			cout << cnt << endl;
		}
	}
	return 0;
}